import {storageSession} from '@/storage'
const state ={
    accessibleRoutes:storageSession.getItem('routes')||[]
}
const mutations ={
    SET_ROUTES:(state,data)=>{
          state.accessibleRoutes = data
          storageSession.setItem('routes',data)
    }
}
const actions = {
    asyncSetRoutes:({commit},data)=>{    
            commit('SET_ROUTES',data)
    }
}
export default {
    namespaced:true,
    state,
    mutations,
    actions
}